<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE xsl:stylesheet  [
	<!ENTITY nbsp   "&#160;">
	<!ENTITY copy   "&#169;">
	<!ENTITY reg    "&#174;">
	<!ENTITY trade  "&#8482;">
	<!ENTITY mdash  "&#8212;">
	<!ENTITY ldquo  "&#8220;">
	<!ENTITY rdquo  "&#8221;"> 
	<!ENTITY pound  "&#163;">
	<!ENTITY yen    "&#165;">
	<!ENTITY euro   "&#8364;">
    <!ENTITY sup2   "&#178;">
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:page="urn:page">
	<xsl:output method="html" encoding="utf-8"/>
	<xsl:param name="templatename"/>
	<xsl:param name="param"/>
	<xsl:template match="/">
		<xsl:variable name="esfVar" select="concat('http://esf.fz.',page:xConfig('domain','800fc.com'))"/>
		<xsl:variable name="imgVar" select="concat('http://img.',page:xConfig('domain','800fc.com'))"/>
		<xsl:choose>
			<xsl:when test="$templatename='articlehead'">
				<xsl:if test="count(rows/row)=1">
				<dl class="infoNav">
					<dt><a href="/newhouse/v/{rows/row/id}/default.html" target="_blank"><xsl:value-of select="rows/row/f_name"/></a></dt>
					<dd><a href="/newhouse/v/{rows/row/id}/stylepic.html" target="_blank">户型图</a></dd>
					<dd><a href="/newhouse/v/{rows/row/id}/price.html" target="_blank">价格行情</a></dd>
					<dd><a href="/newhouse/v/{rows/row/id}/info.html" target="_blank">交通配套</a></dd>
					<dd><a href="/newhouse/v/{rows/row/id}/news.html" target="_blank">楼盘动态</a></dd>
					<dd><a href="/newhouse/v/{rows/row/id}/album.html" target="_blank">楼盘相册</a></dd>
					<dd><a class="check" href="/newhouse/v/{rows/row/id}/album.html">房产资讯</a></dd>
		<!--			<dd><a href="" target="_blank">业主论坛</a></dd>-->
				</dl>
				</xsl:if>
			</xsl:when>
		
			<!--首页.begin--> 
			<!--搜索条件选择-->
			<xsl:when test="$templatename='RegionSelect' or $templatename='PriceSelect'">
				<xsl:for-each select="rows/row">
					<a href="###" onmousedown="$('#{$param}').val('{f_code}')" title="{f_name}"><xsl:value-of select="f_name"/></a>
				</xsl:for-each>
			</xsl:when>
			<!--地区楼盘中心-->
			<xsl:when test="$templatename='地区楼盘中心'">
				<xsl:for-each select="rows/row">
					<a href="/newhouse/v/{id}/default.html" target="_blank" title="{f_name}"><xsl:value-of select="f_name"/></a>
				</xsl:for-each>
			</xsl:when>
			
			<!--精选楼盘-->
			<xsl:when test="$templatename='精选楼盘'">
				<xsl:for-each select="rows/row">
					<ul>
						<li>
							<div><a href="/newhouse/v/{id}/default.html" target="_blank" title="{f_name}"><img src="http://img.800fc.com/{f_images}" alt="{f_name}" title="{f_name}" /></a></div>
						</li>
						<li>
							<h4><a href="/newhouse/v/{id}/default.html" target="_blank" title="{f_name}"><xsl:value-of select="substring(f_name,1,9)"/></a></h4>
						</li>
						<li><span>[<xsl:value-of select="f_regionname"/>]</span><b class="red"><xsl:value-of select="f_price"/></b><xsl:value-of select="f_priceunitname"/></li>
					</ul>
				</xsl:for-each>
			</xsl:when>
			
			<!--最受关注楼盘-->
			<xsl:when test="$templatename='最受关注楼盘'">
				<dl>
					<xsl:for-each select="rows/row[position()&lt;=2]">
						<dd> <img src="http://img.800fc.com{f_images}" /> <span> <a href="/newhouse/v/{id}/default.html" target="_blank"><xsl:value-of select="f_name"/></a><br />
							<font class="red">
							<xsl:if test="f_price=0">
								待定
							</xsl:if>
							<xsl:if test="f_price!=0">
								<xsl:value-of select="f_price"/><xsl:value-of select="f_priceunitname"/>
							</xsl:if>
							</font><br />
							<font class="gray1"><xsl:value-of select="f_regionname"/> </font> </span> </dd>
					</xsl:for-each>
				</dl>
				<div>
					<table cellpadding="0" cellspacing="0">
						<xsl:for-each select="rows/row[position()>2]">
							<tr>
								<td><span><font class="gray1">[<xsl:value-of select="f_regionname"/>]</font><a href="http://fz.800fc.com/newhouse/v/{id}/default.html" target="_blank"><xsl:value-of select="f_name"/></a></span></td>
								<td align="right">
								<xsl:value-of select="page:xIIF(f_price=0,'待定',concat(f_price,f_priceunitname))"/></td>
							</tr>
						</xsl:for-each>
					</table>
				</div>
			</xsl:when>
			
			<!--最新楼盘-->
			<xsl:when test="$templatename='最新楼盘'">
				<table cellpadding="0" cellspacing="0">
					<tr>
						<td width="45%" class="gray1">楼盘</td>
						<td width="28%" class="gray1">区域</td>
						<td class="gray1">价格</td>
					</tr>
					<xsl:for-each select="rows/row">
						<tr>
							<td><a href="/newhouse/v/{id}/default.html" target="_blank" title="{f_name}"><xsl:value-of select="f_name"/></a></td>
							<td class="gray1"><xsl:value-of select="f_regionname"/></td>
							<td align="right"><xsl:value-of select="page:xIIF(f_price=0,'待定',concat(f_price,'元/m&sup2;'))"/></td>
						</tr>
					</xsl:for-each>
				</table>
			</xsl:when>
			
			<!--楼盘问答-->
			<xsl:when test="$templatename='楼盘问答'">
				<xsl:for-each select="rows/row">
					<ul class="content">
						<li class="t"><span class="gray1">网友：<xsl:value-of select="f_username"/></span><b><xsl:value-of select="f_title"/></b></li>
						<li class="w"><b class="c_blue0000ff">问：</b><xsl:value-of select="f_content"/> </li>
						<xsl:if test="f_replystatus=1">
							<li class="h"><b class="c_org">答：</b><xsl:value-of select="f_reply"/> <font class="gray1">(<xsl:value-of select="substring(f_replytime,1,10)"/>)</font></li>
						</xsl:if>
					</ul>
				</xsl:for-each>
			</xsl:when>
			
			<!--首页.end-->
			
			<!--楼盘频道头条-->
			<xsl:when test="$templatename='楼盘频道头条'">
				<xsl:for-each select="rows/row">
					<div class="newsHot">
						<h2><a class="red_e90" href="/info/{F_TPath}" target="_blank"><xsl:value-of select="F_Title"/></a></h2>
						<div class="other"><xsl:value-of select="substring(F_Intro,1,18)"/>……<a href="/info/{F_TPath}" target="_blank">[全文]</a><a href="/info/comment/{ID}.html" target="_blank">[我来说两句]</a></div>
					</div>
				</xsl:for-each>
			</xsl:when>
			<!--焦点头条-->
			<xsl:when test="$templatename='焦点头条'">
				<xsl:for-each select="rows/row[position()&lt;=2]">
					<h2>
						<xsl:if test="position()!=1">
							<xsl:attribute name="class">pt8</xsl:attribute>
						</xsl:if>
						<a class="red_e90" href="/info/{F_TPath}" target="_blank"><xsl:value-of select="F_Title"/></a></h2>
					<div class="other gray1"><xsl:value-of select="F_Intro" disable-output-escaping="yes"/>[<a class="red_e90" href="/info/{F_TPath}" target="_blank">详细</a>]...</div>
				</xsl:for-each>
			</xsl:when>
			
			<!--新闻头条-->
			<xsl:when test="$templatename='新闻头条'">
				<xsl:for-each select="rows/row">
					<li><span class="date fr"><xsl:value-of select="substring(F_UpdateTime,9,2)"/>日</span>
						<xsl:if test="F_Tag!=''">
							<a class="gray1" href="/info/tag/{F_Tag}.html" target="_blank">[<xsl:value-of select="F_Tag"/>]</a>
						</xsl:if>
						<a href="/info/{F_TPath}" target="_blank"><xsl:value-of select="F_Title"/></a></li>
				</xsl:for-each>
			</xsl:when>
			
					
			<!--热点团购-->
			<xsl:when test="$templatename='热点团购'">
				<xsl:for-each select="rows/row">
					<dt>
						<div> <img src="{F_Image}" /> <span>已报名：<font class="red"><b><xsl:value-of select="F_ApplyNum"/></b>人</font></span> </div>
					</dt>
					<dd>
						<h4><xsl:value-of select="substring(F_Title,1,15)"/></h4>
						<span>活动时间：<xsl:value-of select="concat(substring(F_StartTime,1,4),'年',substring(F_StartTime,7,2),'月',substring(F_StartTime,9,2),'日')"/></span> <span>集合地点：<xsl:value-of select="F_MeetingPlace"/></span> <span style="height:25px; padding-top:5px;"><a class="kft_reg"  href="/activity/content/{ID}.html" target="_blank">我要报名</a><a  target="_blank" class="kft_more" href="/activity/content/{ID}.html">查看更多</a></span> </dd>
				</xsl:for-each>
			</xsl:when>	

			
			<!--急售房源-->
			<xsl:when test="$templatename='急售房源'">
				<xsl:for-each select="rows/row">
					<xsl:variable name="img" select="page:xIIF(contains(F_Images,'.jpg') or contains(F_Images,'.gif'),F_Images,'')"/>
					<ul>
						<li>
							<div><a href="{$esfVar}{F_TPath}" target="_blank" title="{F_Community}"><img src="http://img.{page:xConfig('domain','800fc.com')}/{F_Images}" alt="{F_Community}" title="{F_Community}" /></a></div>
						</li>
						<li>
							<h4><a href="{$esfVar}{F_TPath}" target="_blank" title="{F_Community}"><xsl:value-of select="substring(page:xIIF(F_Community!='',F_Community,F_Title),1,8)"/></a></h4>
						</li>
						<li><span><xsl:value-of select="F_RegionName"/></span><span><xsl:value-of select="concat(substring(F_Style,1,1),'房',substring(F_Style,2,1),'厅')"/></span></li>
						<li><span>135㎡</span> <b class="red"><xsl:value-of select="format-number(F_Price,'#0.#')"/></b>万元</li>
					</ul>
				</xsl:for-each>
			</xsl:when>
			
			<!--出租房源,业主出租,二手房源,业主出售-->
			<xsl:when test="$templatename='出租房源' or $templatename='业主出租' or $templatename='二手房源' or $templatename='业主出售'">
				<xsl:for-each select="rows/row">
					<li><span class="price">
						<xsl:if test="F_Price=0">
							面议
						</xsl:if>
						<xsl:if test="F_Price!=0">
							<xsl:value-of select="format-number(F_Price,'#0.#')"/><xsl:value-of select="F_PriceUnitName"/>
						</xsl:if>
						</span>
						<xsl:if test="$templatename='二手房源' or $templatename='业主出售'">
							<span class="area"><xsl:value-of select="F_Area"/>㎡</span>
						</xsl:if>
						<span class="fr">3室2厅0卫</span><span class="gray1">[<xsl:value-of select="substring(F_RegionName,1,2)"/>]</span>
						<h4><a href="{$esfVar}{F_TPath}" target="_blank"><xsl:value-of select="substring(page:xIIF(F_Community!='',F_Community,F_Title),1,8)"/></a></h4>
					</li>
				</xsl:for-each>
			</xsl:when>
			
			<!--金牌经纪人-->
			<xsl:when test="$templatename='金牌经纪人'">
				<dt>
					<div class="fl"><img src="/images/esf/pople.jpg"/></div>
					<ul class="fl">
						<li><b><a href="{$esfVar}/rs/view/{F_Passport_ID}.html" target="_blank"><xsl:value-of select="rows/row/F_Name"/></a></b><span class="red">（人气<xsl:value-of select="rows/row/F_Hits"/>）</span></li>
						<li>电话：<xsl:value-of select="rows/row/F_Phone"/></li>
						<li><b class="green1">出售：</b><font class="gray2">(<xsl:value-of select="rows/row/F_SellCount"/>)</font>&nbsp;&nbsp;<b class="green1">出租：</b><font class="gray2">(<xsl:value-of select="rows/row/F_RentCount"/>)</font></li>
						<li class="gray1"><a href="{$esfVar}/rs/view/{F_Passport_ID}.html" target="_blank">进入店铺>></a></li>
					</ul>
				</dt>
				<xsl:for-each select="rows/row[position()!=1]">
					<dd><span><a href="{$esfVar}/rs/view/{F_Passport_ID}.html" target="_blank"><xsl:value-of select="F_Name"/></a>(<xsl:value-of select="F_Hits"/>)</span><span>出售<font class="gray2">(<xsl:value-of select="F_SellCount"/>)</font></span><span>出租<font class="gray2">(<xsl:value-of select="F_RentCount"/>)</font></span></dd>
				</xsl:for-each>
			</xsl:when>
			
		</xsl:choose>
	</xsl:template>
</xsl:stylesheet>